#include<iostream>
#include<algorithm>
#include<set> 

using namespace std;
typedef pair<string, string> pd;
set<pd> p;

int main()
{
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        string a,b;
        cin>>a>>b;
        p.insert({a,b});
    }
    cout<<p.size()<<endl;
    return 0;
}
